/*StuThree.c -- 箭头*/
#include "stdio.h"

typedef struct Stu{
    //成员变量
    char name[20];
    short age;
    char tele[12];
    char sex[5];
}Stu;

void Print1(Stu tmp){
    printf("name:%s\n",tmp.name);
    printf("age:%d\n",tmp.age);
    printf("tele:%s\n",tmp.tele);
    printf("sex:%s\n",tmp.sex);
}

void Print2(Stu* ps){
    printf("name: %s\n",ps->name);
    printf("age: %d\n",ps->age);
    printf("tele: %s\n",ps->tele);
    printf("sex: %s\n",ps->sex);
}

int main(){
    Stu s = {"李四",25,"15161314","男"};
    Print1(s); //常规写法
    Print2(&s); //传入的参数是指针
    return 0;
}